import 'package:animal/constant/font.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:flutter/material.dart';

///通用按钮button
class ButtonItem {
  ///文字在图片按钮下方
  static Widget iconTextButton({Widget? child, int? textSize, Color? fontColor, bool? bold, double? top, String? text}) {
    return Column(
      children: [
        child ?? Container(),
        Container(
            margin: EdgeInsets.only(top: ScreenUtil().L(top ?? 10)),
            child: Text(text ?? "按钮文字", style: KFontConstant.myTextStyle(size: textSize ?? 15, color: fontColor ?? Colors.black, bold: bold ?? false)))
      ],
    );
  }
}
